package com.ktjy.order.domain;

import lombok.Data;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import java.math.BigDecimal;
import java.util.Date;
import com.fasterxml.jackson.annotation.JsonFormat;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.ktjy.common.annotation.Excel;
import com.ktjy.common.core.domain.BaseEntity;

/**
 * 订单信息对象 t_order
 *
 * @author ktjy
 * @date 2025-03-17
 */
@Data
@TableName("t_order")
public class Order extends BaseEntity {
private static final long serialVersionUID=1L;

        /** 订单编号 */
            @TableId(value = "id" , type = IdType.AUTO)
        private Long id;

        /** 订单流水号 */
                @Excel(name = "订单流水号")
            @TableField(value = "order_sn")
        private String orderSn;

        /** 会员id */
                @Excel(name = "会员id")
            @TableField(value = "user_id")
        private Long userId;

        /** 订单状态 */
                @Excel(name = "订单状态")
            @TableField(value = "order_state")
        private Integer orderState;

        /** 联系地址id */
                @Excel(name = "联系地址id")
            @TableField(value = "address_id")
        private Integer addressId;

        /** 快递公司 */
            @TableField(value = "express_company")
        private String expressCompany;

        /** 快递单号 */
            @TableField(value = "express_number")
        private String expressNumber;

        /** 快递费用 */
            @TableField(value = "express_cost")
        private BigDecimal expressCost;

        /** 订单总价 */
            @TableField(value = "order_price")
        private BigDecimal orderPrice;

        /** 实际支付金额 */
                @Excel(name = "实际支付金额")
            @TableField(value = "actual_price")
        private BigDecimal actualPrice;

        /** 付款时间 */
            @TableField(value = "pay_time")
        private Date payTime;

        /** 删除标识字段(0-未删除 1-已删除) */
            @TableField(value = "enabled")
        private Integer enabled;

        @TableField(exist = false)
        private String userName;

        @TableField(exist = false)
        private String fullLocation;

        @TableField(exist = false)
        private String telNumber;

        @TableField(exist = false)
        private String consignee;

        @TableField(exist = false)
        private String goodsName;

        @TableField(exist = false)
        private double goodsPrice;

        @TableField(exist = false)
        private String attrsText;

        @TableField(exist = false)
        private int quantity;

        @TableField(exist = false)
        private int tid;


    @Override
public String toString(){
    return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
        .append("id" ,getId())
        .append("orderSn" ,getOrderSn())
        .append("userId" ,getUserId())
        .append("orderState" ,getOrderState())
        .append("addressId" ,getAddressId())
        .append("expressCompany" ,getExpressCompany())
        .append("expressNumber" ,getExpressNumber())
        .append("expressCost" ,getExpressCost())
        .append("orderPrice" ,getOrderPrice())
        .append("actualPrice" ,getActualPrice())
        .append("payTime" ,getPayTime())
        .append("enabled" ,getEnabled())
        .append("createTime" ,getCreateTime())
        .append("updateTime" ,getUpdateTime())
        .append("createBy" ,getCreateBy())
        .append("updateBy" ,getUpdateBy())
        .append("remark" ,getRemark())
            .toString();
}
        }